package com.enjoylearning.auth.controller;

import com.enjoylearning.auth.service.RegisterService;
import com.enjoylearning.base.model.RestResponse;
import com.enjoylearning.ucenter.model.dto.RegisterParamsDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RegisterController {

    @Autowired
    private RegisterService registerService;

    @ApiOperation("注册")
    @PostMapping("/register")
    public RestResponse register(@RequestBody RegisterParamsDto registerParamsDto) {
        return registerService.register(registerParamsDto);
    }
}
